package com.atguigu.gmall.product.service.impl;

import com.atguigu.gmall.item.to.CategoryView;
import com.atguigu.gmall.product.entity.BaseCategory1;
import com.atguigu.gmall.product.mapper.BaseCategory1Mapper;
import com.atguigu.gmall.product.service.BaseCategory1Service;
import com.atguigu.gmall.product.to.CategoryTreeTo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lyd
 * @description 针对表【base_category1(一级分类表)】的数据库操作Service实现
 * @createDate 2023-08-15 13:49:56
 */
@Service
public class BaseCategory1ServiceImpl extends ServiceImpl<BaseCategory1Mapper, BaseCategory1>
        implements BaseCategory1Service {

    @Autowired
    private StringRedisTemplate redisTemplate;

    @Override
    public List<CategoryTreeTo> getCategoryTree() {
        return baseMapper.getCategoryTree();
    }

    @Override
    public CategoryView getCategoryView(Long c3Id) {

        return baseMapper.getCategoryView(c3Id);
    }
}




